package com.neusoft.databus.core.service;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.neusoft.bizcore.web.support.Searchable;
import com.neusoft.databus.common.dto.MetricGroupDTO;

/**
 * @author naxiang
 */
public interface MetricGroupService {
    MetricGroupDTO findById(Long id);

    MetricGroupDTO findByCode(String code);

    List<MetricGroupDTO> findAll();

    Page<MetricGroupDTO> search(Pageable pageable, Searchable searchable);

    List<MetricGroupDTO> search(Searchable searchable);

    MetricGroupDTO create(MetricGroupDTO dto);

    MetricGroupDTO update(String code, MetricGroupDTO dto);

    void bindById(Long id, List<Long> metricIdList);

    MetricGroupDTO bindByCode(String code, List<String> metricIdList);

    void deleteById(Long id);

    void deleteByCode(String code);

    void export(final Searchable searchable, final Pageable pageable, final HttpServletResponse response);

}
